{% extends "translate/base.html" %}
{% load i18n %}

{% block "title" %}
    {% trans "Translate object" %}: {{ obj }}
{% endblock %}

{% block "translate-content" %}
 <h1>
    {% blocktrans with language.localized_name as lang%}Translate {{ obj }} to {{ lang }}{% endblocktrans %}
    {% if obj.get_absolute_url %}
        (<a href="{{ obj.get_absolute_url }}">{% trans "View object page" %}</a>)
    {% endif %}
 </h1>

 <div>
    {% trans "Translate to:" %}
    <ul>
    {% for lang in languages %}
      <li>
        {% ifequal language.code lang.code %}
         {{ lang.native_name }}
        {% else %}
         <a href="?lang={{lang.code}}">{{ lang.native_name }}</a>
        {% endifequal %}
      </li>
    {% endfor %}
    </ul>
 </div>

 <form method="post">
    {% for group in form.fields_group %}
      <fieldset>
        <legend>{{ group.name|capfirst }}</legend>
        <div class="form-row"><label class="aligned">{% trans "Original" %}: {{ group.original }}</label></div>
        <div class="form-row"><label class="aligned">{{ language.localized_name }}:{{ group.translation }}</label></div>
      </fieldset>
    {% endfor %}
  <input type="submit" value="{% trans "Save" %}"/>
 </form>
{% endblock %}
